/*
 * MathUtil.h
 *
 *  Created on: 27.11.2011
 *      Author: jan
 */

#ifndef MATHUTIL_H_
#define MATHUTIL_H_

#include <cstdlib>

//random from [0,1)
#define UNIFORM_RAND_WITHOUT_ONE ((double)rand()/(RAND_MAX+1))
//[0,1]
#define UNIFORM_RAND ((double)rand()/(RAND_MAX))
//degree to radiant
#define radians(d) (((double) d) * M_PI /180)

#endif /* MATHUTIL_H_ */
